<?php


namespace app\meetyou\controller;

use library\Controller;
use library\tools\Data;
use think\Db;

/**
 * 会员信息管理
 * Class Finance
 * @package app\meetyou\controller
 */
class Finance extends Controller {
    /**
     * 绑定数据表
     * @var string
     */
    protected $table = 'meetyou_credits_record';

    /**
     * 积分明细管理
     * @auth true
     * @menu true
     * @throws \think\Exception
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\ModelNotFoundException
     * @throws \think\exception\DbException
     * @throws \think\exception\PDOException
     */
    public function credit() {
        $type = 'credit1';
        $this->title = '积分明细';
        $this->_query($this->table)->alias('r')
            ->leftJoin(' meetyou_member m ', 'm.id=r.mid')
            ->field('r.*,m.account,m.nickname,m.realname,m.phone,m.spare_phone,m.avatar')
            ->like('m.nickname#nickname,m.phone#phone')
            ->equal('m.id#id')
            ->dateBetween('r.create_at#create_at')
            ->order('r.id desc')->page();

    }
}